home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Updaters / Symantec C++⁄MPW 6.0.1 / SCpp 6.0.1 Update / MacApp / Build Rules and Dependencies next >
Encoding:
Text File  |  1993-08-04  |  10.5 KB  |  400 lines  |  [TEXT/MPS ]

  1. # Copyright © 1984-1992 by Apple Computer Inc.  All rights reserved.
  2. #    Build Rules and Dependencies
  3.  
  4.  
  5. ###########################################################
  6. # Default build rules
  7. ###########################################################
  8. .a.o                                ƒ ∂
  9.                                     .a ∂
  10.                                     {MAAsm} ∂
  11.                                     {AsmLoad} ∂
  12.                                     "{BuildFlags}"
  13.     {MAEcho} {EchoOptions} "Assembling:    {default}.a"
  14.     {MAAsm} ∂
  15.         {AsmOptions} ∂
  16.         {OtherAsmOptions} ∂
  17.         {AsmLoadOptions} ∂
  18.         -i "{SrcApp}" ∂
  19.         -i "{MAAIncludes}" ∂
  20.         -i "{MAAStructMacs}" ∂
  21.         -o {targDir}{default}.a.o ∂
  22.         {depDir}{default}.a
  23.  
  24. .c.o                                ƒ ∂
  25.                                     .c ∂
  26.                                     {MAC} ∂
  27.                                     "{BuildFlags}"
  28.     {MAEcho} {EchoOptions} "Compiling:     {default}.c"
  29.     {MAC} ∂
  30.         {COptions} ∂
  31.         {CPlusCPUOptions} ∂
  32.         {OtherCOptions} ∂
  33.         -i "{SrcApp}" ∂
  34.         -i "{MACPlusIncludes}" ∂
  35.         -o {targDir}{default}.c.o ∂
  36.         {depDir}{default}.c
  37.  
  38. .cp.o                                ƒ ∂
  39.                                     .cp ∂
  40.                                     {MACPlus} ∂
  41.                                     "{BuildFlags}"
  42.     {MAEcho} {EchoOptions} "Compiling:     {default}.cp"
  43.     {MACPlus} ∂
  44.         {CPlusOptions} ∂
  45.         {SCOptions} ∂
  46.         {CPlusCPUOptions} ∂
  47.         {OtherCPlusOptions} ∂
  48.         {CPlusLoadOptions} ∂
  49.         -i "{SrcApp}" ∂
  50.         -i "{CPlusIncludesSC}" ∂
  51.         -i "{CPlusIncludes}" ∂
  52.         -i "{MACPlusIncludes}" ∂
  53.         -o {targDir}{default}.cp.o ∂
  54.         {depDir}{default}.cp
  55.  
  56. .p.o                                ƒ ∂
  57.                                     .p ∂
  58.                                     {MAPascal} ∂
  59.                                     "{BuildFlags}"
  60.     {MAEcho} {EchoOptions} "Compiling:     {default}.p"
  61.     {MAPascal} ∂
  62.         {PascalOptions} ∂
  63.         {PascalCPUOptions} ∂
  64.         {OtherPascalOptions} ∂
  65.         {PascalLoadFolder} ∂
  66.         -i "{SrcApp}" ∂
  67.         -i "{MAPInterfaces}" ∂
  68.         -o {targDir}{default}.p.o ∂
  69.         {depDir}{default}.p
  70.  
  71. .rsrc                                ƒ ∂
  72.                                     .r ∂
  73.                                     {MARez} ∂
  74.                                     "{BuildFlags}"
  75.     {MAEcho} {EchoOptions} "Rezzing:       {default}.r"
  76.     SET XToolStartTime `DATE -n`
  77.     IF {OtherViewTypesSrc} != ""
  78.         SET XOtherViewTypesSrc {OtherViewTypesSrc}
  79.         SET XIncludeOtherViewTypes 1
  80.         EXPORT XOtherViewTypesSrc
  81.     ELSE
  82.         SET XIncludeOtherViewTypes 0
  83.     END
  84.     {MARez} ∂
  85.         -d XIncludeOtherViewTypes={XIncludeOtherViewTypes} ∂
  86.         -i "{SrcApp}" ∂
  87.         -i "{MARIncludes}" ∂
  88.         -o {targDir}{default}.rsrc ∂
  89.         -s "{ObjApp}" ∂
  90.         -s "{MAObj}" ∂
  91.         -s "{SrcApp}" ∂
  92.         -t "'rsrc'" -c "'RSED'" ∂
  93.         {RezOptions} ∂
  94.         {OtherRezOptions} ∂
  95.         {depDir}{default}.r
  96.     IF "{XTimes}"
  97.         {MAEcho} {EchoOptions} Elapsed time: `evaluate ∂`DATE -n ∂` - {XToolStartTime}` seconds
  98.     END
  99.  
  100. ###########################################################
  101. # D E P E N D E N C I E S
  102. ###########################################################
  103. # Trigger for the application build
  104. "{ObjApp}"        ƒ    "{SrcApp}"
  105.  
  106.  
  107. #{AppName} dependencies
  108. "{ObjApp}{AppName}"                    ƒƒ ∂
  109.                                     "{BuildFlags}" ∂
  110.                                     {CPlusLoad} ∂
  111.                                     {MacAppLib} ∂
  112.                                     {NeededSysLibs} ∂
  113.                                     {OtherLinkFiles} ∂
  114.                                     "{XAppName.p.o}" ∂
  115.                                     "{XAppName.cp.o}" ∂
  116.                                     "{XUAppName.p.o}" ∂
  117.                                     "{XUAppName.cp.o}" ∂
  118.                                     "{XMAppName.p.o}" ∂
  119.                                     "{XMAppName.cp.o}"
  120.     {MAEcho} {EchoOptions} "Linking:       {AppName}"
  121.     SET XToolStartTime `DATE -n`
  122.     {MALink} ∂
  123.         {SymantecInit} ∂
  124.         "{XAppName.p.o}" ∂
  125.         "{XUAppName.p.o}" ∂
  126.         "{XMAppName.p.o}" ∂
  127.         "{XAppName.cp.o}" ∂
  128.         "{XUAppName.cp.o}" ∂
  129.         "{XMAppName.cp.o}" ∂
  130.         {OtherLinkFiles} ∂
  131.         {CPlusLoadObj} ∂
  132.         {MacAppLib} ∂
  133.         {NeededSysLibs} ∂
  134.         {SegmentMappings} ∂
  135.         {OtherSegMappings} ∂
  136.         -o "{ObjApp}{AppName}" ∂
  137.         {XLinkXRef} ∂
  138.         {XLinkMap} ∂
  139.         {LinkOptions} ∂
  140.         {OtherLinkOptions} ∂
  141.         ||  (∂ 
  142.         IF `EXISTS "{ObjApp}M{AppName}.p.o"` == '' ∂
  143.             SetFile -m . "{ObjApp}M{AppName}.p.o"; ∂
  144.             end; ∂
  145.         IF `EXISTS "{ObjApp}M{AppName}.cp.o"` == '' ∂
  146.             SetFile -m . "{ObjApp}M{AppName}.cp.o"; ∂
  147.             end; ∂
  148.          Exit 99)
  149.     IF "{XTimes}"
  150.         {MAEcho} {EchoOptions} Elapsed time: `evaluate ∂`DATE -n ∂` - {XToolStartTime}` seconds
  151.     END
  152.  
  153.  
  154. #{AppName} dependencies
  155. "{ObjApp}{AppName}"                    ƒƒ ∂
  156.                                     "{XAppRezSrc}" ∂
  157.                                     "{BuildFlags}" ∂
  158.                                     {MacAppResources} ∂
  159.                                     {MacAppRIntf} ∂
  160.                                     {OtherViewTypesSrc} ∂
  161.                                     {OtherRezFiles} ∂
  162.                                     {OtherRsrcFiles}
  163.     IF "{XAutoRez}"
  164.         {MAEcho} {EchoOptions} "AutoRezzing:   Default.r"
  165.     ELSE
  166.         {MAEcho} {EchoOptions} "Rezzing:       {AppName}.r"
  167.     END
  168.     SET XToolStartTime `DATE -n`
  169.     IF {OtherViewTypesSrc} != ""
  170.         SET XOtherViewTypesSrc {OtherViewTypesSrc}
  171.         SET XIncludeOtherViewTypes 1
  172.         EXPORT XOtherViewTypesSrc
  173.     ELSE
  174.         SET XIncludeOtherViewTypes 0
  175.     END
  176.     {MARez} ∂
  177.         -d XIncludeOtherViewTypes={XIncludeOtherViewTypes} ∂
  178.         -i "{SrcApp}" ∂
  179.         -i "{MARIncludes}" ∂
  180.         -o "{MATemporaries}MABuild{MATempFilesExtension}" ∂
  181.         -s "{ObjApp}" ∂
  182.         -s "{MAObj}" ∂
  183.         -s "{SrcApp}" ∂
  184.         {RezOptions} ∂
  185.         {OtherRezOptions} ∂
  186.         "{XAppRezSrc}" ∂
  187.         {OtherRezFiles}
  188.     IF "{XTimes}"
  189.         {MAEcho} {EchoOptions} Elapsed time: `evaluate ∂`DATE -n ∂` - {XToolStartTime}` seconds
  190.     END
  191.     {MAEcho} {EchoOptions} "Creator&Bundle:{AppName}"
  192.     {MACreatorAndBundle} ∂
  193.         {CreatorAndBundleOptions} ∂
  194.         {OtherCreatorAndBundleOptions} ∂
  195.         "{MATemporaries}MABuild{MATempFilesExtension}"
  196.     Duplicate "{MATemporaries}MABuild{MATempFilesExtension}" "{ObjApp}{AppName}" -y
  197.     Delete "{MATemporaries}MABuild{MATempFilesExtension}" -y
  198.  
  199. #{AppName} dependencies
  200. "{ObjApp}{AppName}"                    ƒƒ ∂
  201.                                     "{XMakeIt}"
  202.     {MAEcho} {EchoOptions} " ∂"{ObjApp}{AppName}∂"  # <- Execute to run your application"
  203.     IF "{XRunAfterBuild}"
  204.         {MAEcho} {EchoOptions} "Running:       ∂"{ObjApp}{AppName}∂""
  205.         "{ObjApp}{AppName}"
  206.     END
  207.  
  208.  
  209. # Dependencies for the "Magically" named files
  210. "{ObjApp}M{AppName}.p.o"            ƒ ∂
  211.                                     "{XUAppName.p}" ∂
  212.                                     {BuildingBlocksPascalIntf} ∂
  213.                                     {MacAppPascalIntf} ∂
  214.                                     {OtherInterfaces}
  215. "{ObjApp}U{AppName}.p.o"            ƒ ∂
  216.                                     {XUAppName.inc.p} ∂
  217.                                     {BuildingBlocksPascalIntf} ∂
  218.                                     {MacAppPascalIntf} ∂
  219.                                     {OtherInterfaces}
  220. "{ObjApp}{AppName}.p.o"                ƒ ∂
  221.                                     {BuildingBlocksPascalIntf} ∂
  222.                                     {MacAppPascalIntf} ∂
  223.                                     {OtherInterfaces}
  224.  
  225. #C++
  226. "{ObjApp}M{AppName}.cp.o"            ƒ ∂
  227.                                     "{XUAppName.h}" ∂
  228.                                     {BuildingBlocksCPlusIntf} ∂
  229.                                     {MacAppCPlusIntf} ∂
  230.                                     {OtherInterfaces}
  231. "{ObjApp}U{AppName}.cp.o"            ƒ ∂
  232.                                     "{XUAppName.h}" ∂
  233.                                     {BuildingBlocksCPlusIntf} ∂
  234.                                     {MacAppCPlusIntf} ∂
  235.                                     {OtherInterfaces}
  236. "{ObjApp}{AppName}.cp.o"            ƒ ∂
  237.                                     {BuildingBlocksCPlusIntf} ∂
  238.                                     {MacAppCPlusIntf} ∂
  239.                                     {OtherInterfaces}
  240.  
  241.  
  242.  
  243. # "Dump" files for assembler
  244.  
  245. "{MALoadFiles}{SeparateObjectsFolder}ProgStrucMacs.d" ƒ    ∂
  246.         "{MAAStructMacs}ProgStrucMacs.a" ∂
  247.         "{BuildFlags}"
  248.     {MAEcho} {EchoOptions} "Asm Load:      ProgStrucMacs.d"
  249.     {MAAsm} ∂
  250.         -o dev:Null ∂
  251.         "{MAAStructMacs}ProgStrucMacs.a"
  252.     Duplicate ProgStrucMacs.d "{MALoadFiles}{SeparateObjectsFolder}" -y
  253.     Delete ProgStrucMacs.d  -y
  254.  
  255. "{MALoadFiles}{SeparateObjectsFolder}FlowCtlMacs.d" ƒ ∂
  256.         "{MAAStructMacs}FlowCtlMacs.a" ∂
  257.         "{BuildFlags}"
  258.     {MAEcho} {EchoOptions} "Asm Load:      FlowCtlMacs.d"
  259.     {MAAsm} ∂
  260.         -o dev:Null ∂
  261.         "{MAAStructMacs}FlowCtlMacs.a"
  262.     Duplicate FlowCtlMacs.d "{MALoadFiles}{SeparateObjectsFolder}" -y
  263.     Delete FlowCtlMacs.d  -y
  264.  
  265. # Load/Dump files must be kept current for C++ too
  266. # !!! but the dump files must be made dependent on a buildflags kept for the dumpfiles folder!!!
  267. {CPlusLoadFiles} {CPlusLoadObj}    ƒ ∂
  268.         {CPlusIntf} ∂
  269.         {MacAppCPlusIntf}
  270.     {MAEcho} {EchoOptions} "C++ Load/Dump: MacApp.h.dump"
  271.     IF `EXISTS {CPlusLoad}` != ''
  272.         Delete {CPlusLoad}
  273.         END
  274.     {MACPlus} ∂
  275.         {SCOptions} ∂
  276.         {CPlusOptions} ∂
  277.         {CPlusCPUOptions} ∂
  278.         {OtherCPlusOptions} ∂
  279.         -i "{SrcApp}" ∂
  280.         -i "{CPlusIncludesSC}" ∂
  281.         -i "{CPlusIncludes}" ∂
  282.         -i "{MACPlusIncludes}" ∂
  283.         "{MACPlusIncludes}MacApp.h" ∂
  284.         # Any other files you want to include in the dump could go here ∂
  285.         -o {CPlusLoadObj} ∂
  286.         -dumpc {CPlusLoad} || (Delete {CPlusLoad})
  287.  
  288.  
  289. ###########################################################
  290. # T O O L   D E P E N D E N C I E S
  291. ###########################################################
  292. "{ObjApp}{ToolName}"                ƒƒ ∂
  293.                                             "{BuildFlags}" ∂
  294.                                             {MacAppLib} ∂
  295.                                             {NeededSysLibs} ∂
  296.                                             {OtherLinkFiles} ∂
  297.                                             "{XAppName.p.o}" ∂
  298.                                             "{XAppName.cp.o}" ∂
  299.                                             "{XUAppName.p.o}" ∂
  300.                                             "{XUAppName.cp.o}" ∂
  301.                                             "{XMAppName.p.o}" ∂
  302.                                             "{XMAppName.cp.o}"
  303.     {MAEcho} {EchoOptions} "Linking:       {ToolName}"
  304.     SET XToolStartTime `DATE -n`
  305.     {MALink} ∂
  306.         {SymantecInit} ∂
  307.         "{XAppName.p.o}" ∂
  308.         "{XUAppName.p.o}" ∂
  309.         "{XMAppName.p.o}" ∂
  310.         "{XAppName.cp.o}" ∂
  311.         "{XUAppName.cp.o}" ∂
  312.         "{XMAppName.cp.o}" ∂
  313.         {OtherLinkFiles} ∂
  314.         "{Libraries}Stubs.o" ∂
  315.         {NeededSysLibs} ∂
  316.         {MacAppLib} ∂
  317.         {SegmentMappings} ∂
  318.         {OtherSegMappings} ∂
  319.         -o "{ObjApp}{ToolName}" -t 'MPST' -c 'MPS ' ∂
  320.         {XLinkXRef} ∂
  321.         {XLinkMap} ∂
  322.         {LinkOptions} ∂
  323.         {OtherLinkOptions} ∂
  324.         ||  (∂ 
  325.         IF `EXISTS "{ObjApp}{ToolName}.p.o"` == '' ∂
  326.             SetFile -m . "{ObjApp}{ToolName}.p.o"; ∂
  327.             end; ∂
  328.         IF `EXISTS "{ObjApp}{ToolName}.cp.o"` == '' ∂
  329.             SetFile -m . "{ObjApp}{ToolName}.cp.o"; ∂
  330.             end; ∂
  331.          Exit 99)
  332.     IF "{XTimes}"
  333.         {MAEcho} {EchoOptions} Elapsed time: `evaluate ∂`DATE -n ∂` - {XToolStartTime}` seconds
  334.     END
  335.  
  336. #ToolName dependencies
  337. "{ObjApp}{ToolName}.p.o"            ƒ ∂
  338.                                     {MacAppPascalIntf}
  339.  
  340. "{ObjApp}{ToolName}"                ƒƒ ∂
  341.                                     "{SrcApp}{ToolName}.r" ∂
  342.                                     {OtherViewTypesSrc}
  343.     {MAEcho} {EchoOptions} "Rezzing:       {ToolName}"
  344.     SET XToolStartTime `DATE -n`
  345.     IF {OtherViewTypesSrc} != ""
  346.         SET XOtherViewTypesSrc {OtherViewTypesSrc}
  347.         SET XIncludeOtherViewTypes 1
  348.         EXPORT XOtherViewTypesSrc
  349.     ELSE
  350.         SET XIncludeOtherViewTypes 0
  351.     END
  352.     {MARez} ∂
  353.         -d XIncludeOtherViewTypes={XIncludeOtherViewTypes} ∂
  354.         -i "{SrcApp}" ∂
  355.         -i "{MARIncludes}" ∂
  356.         -o "{MATemporaries}MABuild{MATempFilesExtension}" ∂
  357.         -s "{ObjApp}" ∂
  358.         -s "{MAObj}" ∂
  359.         -s "{SrcApp}" ∂
  360.         -t 'MPST' -c 'MPS ' ∂
  361.         {RezOptions} ∂
  362.         {OtherRezOptions} ∂
  363.         "{SrcApp}{ToolName}.r" ∂
  364.         {OtherRezFiles}
  365.     IF "{XTimes}"
  366.         {MAEcho} {EchoOptions} Elapsed time: `evaluate ∂`DATE -n ∂` - {XToolStartTime}` seconds
  367.     END
  368.     Duplicate "{MATemporaries}MABuild{MATempFilesExtension}" "{ObjApp}{ToolName}" -y
  369.     Delete "{MATemporaries}MABuild{MATempFilesExtension}" -y
  370.  
  371. #{ToolName} dependencies
  372. "{ObjApp}{ToolName}"                    ƒƒ ∂
  373.                                     "{XMakeIt}"
  374.     {MAEcho} {EchoOptions} " ∂"{ObjApp}{ToolName}∂"  # <- Execute to run your tool"
  375.     IF "{XRunAfterBuild}"
  376.         {MAEcho} {EchoOptions} "Running:       ∂"{ObjApp}{ToolName}∂""
  377.         "{ObjApp}{ToolName}"
  378.     END
  379.  
  380.  
  381.  
  382. ###########################################################
  383. # L I B R A R Y   D E P E N D E N C I E S
  384. ###########################################################
  385. "{ObjApp}{LibName}"                ƒƒ ∂
  386.                                     {LibObjs}
  387.     IF {MacAppLibrary} || {LibName} !~ /MacApp.lib/ # Special trick to keep MacApp libraries from building
  388.         {MAEcho} {EchoOptions} "Libbing:       {LibName}"
  389.         SET XToolStartTime `DATE -n`
  390.         {MALib} ∂
  391.             {LibOptions} ∂
  392.             {OtherLibOptions} ∂
  393.             {LibObjs} ∂
  394.             -o "{ObjApp}{LibName}"
  395.         IF "{XTimes}"
  396.             {MAEcho} {EchoOptions} Elapsed time: `evaluate ∂`DATE -n ∂` - {XToolStartTime}` seconds
  397.         END
  398.     END
  399.  
  400.